package com.otr.ai.web;

import com.otr.ai.service.WeatherService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 天气助手
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/assistant/weather")
public class WeatherAssistantController {

  private final WeatherService weatherService;

  @GetMapping("/chat")
  public String weather(@RequestParam String chatId, @RequestParam String message) {
    return weatherService.chat(chatId, message);
  }
}
